package cn.lingyangwl.agile.misc.order.model;

import cn.lingyangwl.agile.model.constants.*;
import cn.lingyangwl.framework.validation.group.*;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.math.BigDecimal;


/**
 * 订单详情
 *
 * @author shenguangyang
 */
@Getter
@Setter
public class OrderDetailBase {
	@NotNull(message = ValidationCons.NOT_EMPTY, groups = InsertGroup.class)
	private Long id;

	@NotNull(message = ValidationCons.NOT_EMPTY, groups = InsertGroup.class)
	@ApiModelProperty(value = "商品id")
	private Long goodsId;

	@NotNull(message = ValidationCons.NOT_EMPTY, groups = InsertGroup.class)
	@ApiModelProperty(value = "商品sku id")
	private Long skuId;

	@ApiModelProperty(value = "商品sku名称")
	private String skuName;

	@ApiModelProperty(value = "商品sku内容")
	private String skuData;

	@ApiModelProperty(value = "商品内容")
	private String goodsData;

	@ApiModelProperty(value = "商品编号")
	private String skuNo;

	@NotNull(message = ValidationCons.NOT_EMPTY, groups = InsertGroup.class)
	@ApiModelProperty(value = "商品价格")
	private BigDecimal price;

	@NotNull(message = ValidationCons.NOT_EMPTY, groups = InsertGroup.class)
	@ApiModelProperty(value = "商品成本价")
	private BigDecimal costPrice;

	@NotNull(message = ValidationCons.NOT_EMPTY, groups = InsertGroup.class)
	@ApiModelProperty(value = "购买数量")
	private Integer number;

	@NotNull(message = ValidationCons.NOT_EMPTY, groups = InsertGroup.class)
	@ApiModelProperty(value = "商品总价格")
	private BigDecimal goodsTotalPrice;

	@NotNull(message = ValidationCons.NOT_EMPTY, groups = InsertGroup.class)
	@ApiModelProperty(value = "成本总价格")
	private BigDecimal goodsCostPrice;

	@NotEmpty(message = ValidationCons.NOT_EMPTY, groups = InsertGroup.class)
	@ApiModelProperty(value = "商品种类(1.实物 2.虚拟3.卡券)")
	private String goodsType;

	@ApiModelProperty(value = "是否返还库存")
	private Boolean isRefundStock;

	@NotEmpty(message = ValidationCons.NOT_EMPTY, groups = InsertGroup.class)
	@ApiModelProperty(value = "退款方式 1. 原路退款 2. 线下退款 3. 退款到余额")
	private String refundPriceType;

	@NotNull(message = ValidationCons.NOT_EMPTY, groups = InsertGroup.class)
	@ApiModelProperty(value = "商家主动退款（0否  1是）")
	private Boolean shopActiveRefund;

	@NotNull(message = ValidationCons.NOT_EMPTY, groups = InsertGroup.class)
	@ApiModelProperty(value = "优惠金额")
	private BigDecimal promotionPrice;

	@ApiModelProperty(value = "优惠券金额")
	private BigDecimal couponPrice;

	private String remark;
}
